package com.example.cloud.model.personal;

import com.example.cloud.model.common.CommonModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.util.Date;

/**
 * Created by wangtao on 2018/5/21.
 * 工单管理
 */
@Entity(name = "work_order")
@Data
@EqualsAndHashCode(callSuper = false)
public class WorkOrder extends CommonModel {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    // 提交人
    @Column(name = "submit_user_id")
    private Long submitUserId;
    @Column(name = "submit_user_name")
    private String submitUserName;
    // 工单内容
    @Column(name = "work_content")
    private String workContent;
    // 处理人
    @Column(name = "process_user_id")
    private Long processUserId;
    @Column(name = "process_user_name")
    private String processUserName;
    // 受理时间
    @Column(name = "accept_Time")
    private Date acceptTime;
    // 要求完成时间
    @Column(name = "require_complete_time")
    private Date requireCompleteTime;
    // 答复完成时间
    @Column(name = "expect_complete_time")
    private Date expectCompleteTime;
    // 实际完成时间
    @Column(name = "actual_complete_time")
    private Date actualCompleteTime;
    // 审核完成时间
    @Column(name = "audit_complete_time")
    private Date auditCompleteTime;
    // 是否按时完成{0： 1：是 2：否}
    @Column(name = "time_complete", columnDefinition = "INT DEFAULT 0")
    private int timeComplete;
    // 答复内容
    @Column(name = "reply_content")
    private String replyContent;
    // 状态
    @Column(name = "status", columnDefinition = "INT DEFAULT 0")
    private int status;
    @Transient
    private String requireCompleteTimeStr;
    @Transient
    private String expectCompleteTimeStr;
    // 账户编号
    @Column(name = "account_id")
    private Long accountId;
    // 组织机构编号
    @Column(name = "organ_id")
    private Long organId;
    // 组织机构名称
    @Column(name = "organ_name")
    private String organName;
}
